<?php 
include TMPL_PATH.'public/header.phtml';
?>

<div class="pad_10">
<div class="common-form">
<table width="100%" class="table_form contentWrap">
<tr>
<td width="80">问题类型</td> 
<td><?php $category = CategoryModel::getCategoryInfo($orderphoneInfo['model_id']); echo $category['name'];?></td>
</tr>
<tr>
<td>订单号</td>
<td><?php echo $orderphoneInfo['order_sn'];?></td>
</tr>
<tr>
<td>手机</td>
<td><?php echo $orderphoneInfo['mobile'];?></td>
</tr>
<tr>
<td>固话</td>
<td><?php echo $orderphoneInfo['phone'];?></td>
</tr>
<tr>
<td>预约时间</td>
<td><?php echo date('Y-m-d H:i:s',$orderphoneInfo['yuyue_time']);?></td>
</tr>
<tr>
<td>IP</td>
<td><?php echo $orderphoneInfo['ip'];?></td>
</tr>
<tr>
<td>添加时间</td>
<td><?php echo date('Y-m-d H:i:s', $orderphoneInfo['time']);?></td>
</tr>
<tr>
<td>审核状态</td>
<td>
 <input type='radio' name='disabled' onclick="setting_status(<?php echo $orderphoneInfo['id'];?>,0);" value='0' <?php if(isset($orderphoneInfo['disabled']) || $product['disabled']==0) echo 'checked';?> > 未处理&nbsp;&nbsp;&nbsp;&nbsp;
 <input type='radio' name='disabled' onclick="setting_status(<?php echo $orderphoneInfo['id'];?>,1);" value='1' <?php if($orderphoneInfo['disabled'] > 0) echo 'checked';?> > 已处理
</td>
</tr>
</table>
<div class="order_th">商品信息 </div>
<div id="div_setting_2" class="contentList division pad-10">
<div class="table-grid" style="border: 1px solid #efefef;">
	<table width="100%" cellspacing="0" cellpadding="2" border="0" class="gridlist" id="order_items"> 
		<thead> 
			<tr>
			 <th style="width:150px;">货号</th> 
			 <th style="width:300px;">商品名称</th> 
			 <th style="width:100px;">设计师</th> 
			 <th style="width:100px;">价格</th> 
			 <th style="width:100px;">购买数量</th> 
			 <th style="width:100px;">小计</th> 
			</tr> 
		</thead> 
		<tbody>
		<?php 
		if(isset($orderphoneInfo['product']) && $orderphoneInfo['product']):
			foreach ($orderphoneInfo['product'] as $key => $product):
		?>
			<tr> 
				<td align="center"><?php echo $product['product_sn'];?></td> 
				<td><?php echo $product['product_name'];?><img src="<?php echo $product['small_img'];?>" /></td> 
				<td align="center"><?php echo $product['designer_id'] ? $designerList[$product['designer_id']]['username'] : '--';?></td> 
				<td align="center"><?php echo $product['pay_price'];?></td> 
				<td align="center"><?php echo $product['qty'];?></td> 
				<td align="center"><?php echo $product['total_amount'];?></td> 
			</tr>
		<?php 
			endforeach;
		endif;
		?>
		</tbody> 
	</table> 
</div></div>

    <div class="bk15"></div>

<div id="div_setting_5" class="contentList division pad-10">
	<table width="100%" cellspacing="0" cellpadding="0" border="0" class="gridlist"> 
		<thead>
		 <tr>
		  <th style="width:50px;">操作者</th>
		  <th style="width:150px;">操作时间</th>
		  <th style="width:50px;">订单状态</th>
		  <th style="width:50px;">支付状态</th>
		  <th style="width:100px;">配送状态</th>
		  <th style="width:500px;">备注</th>
		 </tr> 
		</thead> 
		<tbody>
		<?php 
			if(isset($orderphoneInfo['logs']) && $orderphoneInfo['logs']):
				foreach ($orderphoneInfo['logs'] as $log):
		?>
		  <tr>
		   <td align="center"><?php echo $log['action_name'];?></td> 
		   <td align="center"><?php echo date('Y-m-d H:i:s', $log['action_time']);?></td> 
		   <td align="center"><?php echo OrderModel::$orderStatusCn[$log['order_status']];?></td> 
		   <td align="center"><?php echo OrderModel::$paymentStatus[$log['payment_status']];?></td> 
		   <td align="center"><?php echo $log['shipping_status']==99 ? '配货中' : OrderModel::$shippingStatus[$log['shipping_status']];?></td> 
		   <td><?php echo $log['action_notice'];?></td> 
		  </tr>
		<?php 
				endforeach;
			endif;
		?>
		</tbody> 
	</table>
</div>

</div>
</div>
</body>
</html>
<script type="text/javascript">
<!--
function setting_status(id,disabled){
	$.get('<?php echo U('comment/change_order_phone_ajax');?>&comid='+id+'&disabled='+disabled,function(){
			if(disabled==0){
				$('#status-'+id).html('<a href="javascript:setting_status('+id+',0);"><font color="blue">×</font></a>');
				$('#disabled-'+id).html('未处理');
			}else{
				$('#status-'+id).html('<a href="javascript:setting_status('+id+',1);"><font color="red">√</font></a>');
				$('#disabled-'+id).html('已处理');
			}
		});
}
//-->
</script>